function type(target) {
  var ret = typeof target;
  var template = {
    "[object Array]": "array",
    "[object String]": "string - object",
    "[object Number]": "number - object",
    "[object Boolean]": "boolean - object",
    "[object Object]": "object22",
  };
  if (target == null) {
    return "null";
  } else if (ret == "object") {
    // 包装类对象
    var str = Object.prototype.toString.call(target);
    return template[str];
  } else {
    return ret;
  }
}
Array.prototype.unique = function () {
  var tmp = {},
    arr = [],
    len = this.length;
  for (var i = 0; i < len; i++) {
    if (!tmp[this[i]]) {
      tmp[this[i]] = "aaa";
      arr.push(this[i]);
    }
  }
  return arr;
};
var uniqueArr = [1, 2, 333, 3, 2, 11, 33, 2].unique();
console.log(uniqueArr);
